<template>
  <div>
    <el-form label-width="80px" size="mini">
      <el-form-item label="名称">
        <el-input v-model="attribute.label"></el-input>
      </el-form-item>
      <el-form-item label="label宽度">
        <el-input-number v-model="attribute.labelWidth" :min="20" :max="1500"/>
      </el-form-item>
      <el-form-item label="提示内容">
        <el-input v-model="attribute.placeholder" placeholder="非范围选择时的占位内容"></el-input>
      </el-form-item>
      <el-form-item label="开始时间提示内容">
        <el-input v-model="attribute.startPlaceholder" placeholder="范围选择时时间开始日期的占位内容"></el-input>
      </el-form-item>
      <el-form-item label="结束时间提示内容">
        <el-input v-model="attribute.endPlaceholder" placeholder="范围选择时结束时间的占位内容"></el-input>
      </el-form-item>
      <el-form-item label="范围选择分隔符">
        <el-input v-model="attribute.separator"></el-input>
      </el-form-item>
      <el-form-item label="默认值">
        <el-input v-model="attribute.value"></el-input>
      </el-form-item>
      <el-form-item label="显示格式">
        <el-input v-model="attribute.format"></el-input>
      </el-form-item>
      <el-form-item label="值的格式">
        <el-input v-model="attribute.valueFormat"></el-input>
      </el-form-item>
      
      <el-form-item label="时间类型">
        <el-select v-model="attribute.type">
          <el-option v-for="(item,index) in typeList" :key="index" :label="item" :value="item"/>
        </el-select>
      </el-form-item>
      <el-form-item label="对齐方式">
        <el-select v-model="attribute.labelPosition">
          <el-option v-for="(item,index) in labelPositionList"
              :key="index" :label="item" :value="item">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="尺寸">
        <el-select v-model="attribute.formSize">
          <el-option v-for="(item,index) in formSizeList" :key="index" :label="item" :value="item">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="自定义样式">
          <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="attribute.style" />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "cpt-date-select-option",
  props: {
    attribute: Object
  },
  data() {
    return {
      typeList: ['year', 'month', 'date', 'dates', 'week', 'datetime', 'datetimerange', 'daterange', 'monthrange'],
      labelPositionList: ['left', 'top', 'right'],
      formSizeList:['mini','small','medium']
    }
  }
}
</script>

<style scoped>

</style>
